function noticeController($rootScope, $scope, noticeService) {
  'ngInject';

  this.paginationQueryNotice = () => {
    const mapParams = {};
    noticeService
      .query({ mapParams, ...{ page: 1, size: 10 } })
      .then((res) => {
        if (res.success) {
          if (res.rows && res.rows.length > 0) {
            this.data = res.rows.splice(0, 1);
            this.hasNoticeData = true;
          } else {
            this.data = [
              {
                id: 1,
                title: '暂无数据！',
              },
            ];
            this.hasNoticeData = false;
          }
        }
      });
  };

  this.paginationQueryNotice();
}

export default noticeController;
